<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>微信会员管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/wechat/jiuWechatMember/">微信会员列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="jiuWechatMember" action="${ctx}/wechat/jiuWechatMember/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		
		<%-- <shiro:hasPermission name="sys:user:edit"><label>商家 ：</label><form:input path="user.name" htmlEscape="false" maxlength="50" class="input-medium"/></shiro:hasPermission> --%>
		<label>会员ID ：</label><form:input path="id" htmlEscape="false" maxlength="50" class="input-medium"/>
		<label>姓名 ：</label><form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
		<label>手机 ：</label><form:input path="mobile" htmlEscape="false" maxlength="50" class="input-medium"/>
		<label>会员号：</label><form:input path="number" htmlEscape="false" maxlength="50" class="input-medium"/>
		<label class="control-label" style="margin-top:3px;">开始时间:</label>
					<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
					<input id="createTime" name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${jiuWechatMember.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>  
<label class="control-label" style="margin-top:3px;">结束时间:</label>
					<input id="endTime" name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${jiuWechatMember.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
		
		
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered ">
		<thead>
		<tr>
		<th>ID</th>
		<th>姓名</th>
		<th>头像</th>
		<th>昵称</th>
		<th>性别</th>
		<th>会员号</th>
		<th>会员OpenId</th>
		<th>手机号</th>
		<th>注册时间</th>
	    <shiro:hasPermission name="wechat:jiuWechatMember:edit"><th>操作</th></shiro:hasPermission>
		</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="jiuWechatMember">
			<tr>
			    <td>${jiuWechatMember.id}</td>
				<td><a href="${ctx}/wechat/jiuWechatMember/form?id=${jiuWechatMember.id}">${jiuWechatMember.name}</a></td>
			    <td><img src="${jiuWechatMember.headimgurl }" style="width:50px;height:50px;"/></td>
			    <td>${jiuWechatMember.nickname}</td>
			     <td>${jiuWechatMember.sex}</td>
			    <td>${jiuWechatMember.number}</td>
			    <td>${jiuWechatMember.openId}</td>
			    <td>${jiuWechatMember.mobile}</td>
			    <td><div style="width: 120px;"><fmt:formatDate value="${jiuWechatMember.createTime}" type="both"/></div></td>
				<shiro:hasPermission name="wechat:jiuWechatMember:edit">
				<td><a class="btn btn-warning" href="${ctx}/wechat/jiuWechatMember/syncFromWechatMember?id=${jiuWechatMember.id}" >同步信息</a>
    				<a class="btn btn-success" href="${ctx}/wechat/jiuWechatMember/form?id=${jiuWechatMember.id}">修改</a>
					<a class="btn btn-danger" href="${ctx}/wechat/jiuWechatMember/delete?id=${jiuWechatMember.id}" onclick="return confirmx('确认要删除该微信会员吗？', this.href)">彻底删除</a>
				</td>
				</shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
	
</body>
</html>
